How to open the Report Without Dialog

Hai

I am facing the problem while opening the report. I created the report (adding the datsource-> CustTAble and SCHRegularDepositTable). I added the code in dialog and fetch method(Opening through front end) like this

Dialog :

public Object dialog(Object _dialog)
{
Object ret;
DialogRunbase dialog = _dialog;
ret = super(_dialog);

dialogCustacc = dialog.addFieldValue(typeid(CustAccount), custacc, ‘Customer Account Number:’);
dialogFdNumber = dialog.addFieldValue(typeid(FixedDepositNumber), FdNo, ‘Fixed Deposit Number:’);

return ret;
}

fetch method:

public boolean fetch()
{
boolean ret;

Query p = new query();
QueryRun qryRun;
QueryBuildDataSource qbds = new QueryBuildDataSource();
;
qbds = p.addDataSource(TableNum(SCHRegularDeposits));
qryRun = new queryRun(p);

while(qryRun.next())
{
schregularDeposits = qryRun.get(tablenum(SCHRegularDeposits));

while select schregularDeposits
where schregularDeposits.SCHDepositorNo == custacc
&& schregularDeposits.SCHRegularDepNo == FdNo
{
element.send(schregularDeposits);
element.executeSection(SCHRegularDeposits1);
element.newPage();
element.executeSection(SCHRegularDeposits2);

}
}
return true;
}

8306.Doc1.docx (136 KB)

In frond end it is opening like dis(screenshot). Based on that customer and FD Number the report is working fine.

But the problem is that( opening through select button and choosing the customer and FD Number) it is not wrking when ever i tried to open the report thru sysquery its is showing this error.

Infolog:(while opening the report showing error):-

Information:
Report is empty, Renewal Report - Report

But my requirment is no need of given the customer and Fd number in Dialog and it hav to open thru sysquery.(i think some code have to add in fetch method )

plz suggest if any code requires for that report.

Plz give me a solution for this issue.

Hi Ramya,

I think u need to wirte this two line of code .

reportRun.query().interactive(false);
reportRun.report().interactive(false);

Try this and dont forget to declare ReportRun object.

Thanks ,

Rajkumar

Hai

I tried that before only. but i didnt get the solution .

hi,

Solution 1:

  1. If you want to fetch data only from SCHRegularDeposits table then Remove the other table (Cust Table) from report Data source

  2. then remove dialog() ,getfromdialog() and fetch() from ur report

Solution 2:

  1. If you want to fetch data only from SCHRegularDeposits table then Remove the other table (Cust Table) from report Data source

  2. Alter the fetch() by the following code

public boolean fetch()
{
boolean ret;

Query p = new query();
QueryRun qryRun;
;
qryRun = new queryRun(this.queryRun());

while(qryRun.next())
{
schregularDeposits = qryRun.get(tablenum(SCHRegularDeposits));

element.send(schregularDeposits);
element.executeSection(SCHRegularDeposits);
element.newPage();
element.executeSection(SCHRegularDeposits);

}

return true;
}

Hope this will help you

hai prasan,

I tried without those dialog and fetch methods. while running the report the data wat its fetching thru dat table ( display methods) its not wrking . so i gven the table and field name . but for some other data we have to fetch thru display method only(but its not taking dat).

Hi,

Kind suggestion, Please use correct english to understand better, dont use words like dat for that, or like these which leads confusion on undertanding.

If you want to use display methods, try to use them under the design node section, here you can use display methods as well or also u can write the simliar code in executeSection if required as similar to display methods code.

good wishes

Hi ,

Sorry. A small correction in the fetch()

Use

qryRun = new queryRun(this.query());

instead of

qryRun = new queryRun(this.queryRun());

Hai prasan

sorry for writing like that. so i have to add those methods in design level right.

yes…

Hai prasan,

Now its wrking fine. i added that fetch method in my report.

Hai

I have one more doubt .in check printing the amount is converting to text(using the numerals2Letter method) .

numerals2Letter = global::numeralsToTxt_IND(schregularDeposits.SCHDepAmount);

so it is showing that amount into text

eg: 11500000 → one lakh fifteen thousand only

Suppose the text have to split into 2 lines when ever the txt is exeeding more than 50 words . So for that also i added these 2 methods (numerals2LetterPart1 and numerals2LetterPart2). but its not wrorking.

I have to datasource in a report.when I try to open after copying from a report.its not opening the report.

In the report, after completion of a page that printed on that page must be moved to the next page and it must be shown in the header. how to do it. Kindly help me.

Hi Ramya,

I hope you doing great, Could you please do me a favor, I have same requirement if possible can you please send me xpo or logic to email Id : ravindarreddyd@yahoo.com .

Thanks and Regards,

Ravindar .

hi guys…

i have one issue while generating the report from form…

while generating report i want to disable the query prompt window…

i dono how to do that…

pls help…

thanks in advance

So how you are calling the report from Form?

Ameen already has his own thread Disable query dialog box, therefore let’s not duplicate the same discussion in all threads in which he posted the same question. Please reply in his thread instead.

OK, I missed the new post.

through button group>menu item

hi guys i fixed that issue by commenting the super method of that button clicked()

and in report init () i set the query.interactive(false)

now its working fine…