rainforestnet / CrystalReportsNinja

A small Windows Console App that loads external Crystal Reports file, takes parameter inputs and export to various format or even print to printer
http://www.rainforestnet.com
93 stars 77 forks source link

Parameters in selection formula #21

Closed mcdado closed 6 years ago

mcdado commented 6 years ago

Premise: I'm a CR newbie, I have inherited a project using it and I'm trying to automate generating pdf reports.

I have a report that has this selection formula: {RPT_lavoro.session}={@Sessione} with RPT_lavoro being a database table, session being a field, and @Sessione from what I understand is a parameter. The software using CR passes that value and uses this formula to filter the tables. I'm trying something like this:

CrystalReportsNinja.exe -E pdf -F report.rpt -O test.pdf -a "Sessione:18"

With these results:

Report loaded successfully
Database Login done
Completed

And the pdf is generated, but it's empty. I tried removing or editing by hand the formula, and it works. I just cannot understand how to make it work. Any tips?

sunk818 commented 6 years ago

does -l (log) produce anything useful?

mcdado commented 6 years ago

Actually it makes no difference, no extra output or changes

mcdado commented 6 years ago

So… remember that I'm a newbie?

I now added a Parameter Field, now it works!