[OT] Rev and Quartam Reports

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gpearson
Posts: 84
Joined: Wed Feb 03, 2010 12:55 pm

[OT] Rev and Quartam Reports

Post by gpearson » Sat Jun 05, 2010 2:26 pm

I have tried the support for Quartam Reports as listed on their website but have not had any luck so I am trying here. My Runtime Revolution School Closing Application is just about completed with the exception of a printing feature In searching around I found the Quartam Reports which I am having issues and looking for some assistance. Here is what I posted on the Quartam Support Site:

In reading the PDF Document in trying to intergrate Quartam Reports into my RevStack, I must be overlooking something as each time I press the Print Button, Runtime Revolution Locks up on me. I will outlined what I have done. At the present time I an using the Demo version while I try to get these two programs working together.



On my Main Stack Script I have the following code



on openStack

if "qrtReportsLib" is not among the lines of the stacksInUse then

start using stack "qrtReportsLib"

qrtReports_InitLicense "<your license key here>"

end if

end openStack





Now right after the end if line above if I put



if qrtReports_VersionNumber() >= "1.1.0" then

answer "Woot. This part is working"

end if



Then I save the stack, Clear the stack from Memory and Run the stack, I will get the answer dialog box. This is what I am expecting it should do. If I move the if statement that has the qrtReports_VersionNumber() from the main stack to the script of a button on a SubStack called Display Results, I get nothing and my application stops responding.



I am wanting to have a button on a page that will print the report which is displaying the data of a Datagrid that is retrieved from a web service.





I know that this is a beginners issue but not sure where I went wrong.
---
Graham Pearson
Goshen, IN USA

We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Re: [OT] Rev and Quartam Reports

Post by kotikoti » Sat Jun 05, 2010 6:25 pm

Hi,
I am able to display the version number for the loaded qrtReportsLib stack. even within a button of a substack of this main stack.

try to confirm that the stack is loaded first using stacksinuse and run the check for the version number. Not sure what you mean by removing from memory. but will guess that you have loaded qrt on its own first and "called" it into your app with start using. but if you have it defined as a resource (see image below) then, the next time you publish it will be made available to your publish directory.

Make sure that the qrt stack is listed
stacks.jpg
stacks.jpg (67.66 KiB) Viewed 8100 times

Here is rev file I put together...
Quartum Report Test.zip
rev file
(2.04 KiB) Downloaded 323 times
I kept a note to myself that I need to put the following lines somewhere in the code calling the reporting engine since the window would otherwise be displayed in the background, not sure you have reached there yet but just wanted you to be aware.

Code: Select all

  set the systemwindow of stack "qrtReportsPreview" to true
  set the loc of stack "qrtReportsPreview" to the screenloc 
Build 160
Version 2.9.0
Platform: Windows

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: [OT] Rev and Quartam Reports

Post by Janschenkel » Mon Jun 07, 2010 9:29 pm

Hi Graham,

The first thing to check, is if the revEngine can find qrtReportsLib.rev - the easiest way to make this happen, is by adding it to your mainStack's stackFiles. Open the Stack Inspector, switch to the 'Stack files' panel, and click the 'folder' icon to track down the file qrtReportsLib.rev on your hard drive - once you've found it, click the 'Open' button to add it to the stackFiles property of your mainstack.
As a bonus, the rev standalone builder will automatically include it in the building process.

I'm a bit confused as to why this would lock up rev completely - could you open the Message Watcher and see what happens? Could you also post the script you're using to print? Are you using one of the 'simple' printing commands (qrtReports_PrintReportForStack/qrtReports_PrintReportForCursor/qrtReports_PrintReportForQuery) or have you built a data broker script?

I'm sure we'll get it sorted out.

Jan Schenkel
Quartam Reports & PDF Library for LiveCode
www.quartam.com

gpearson
Posts: 84
Joined: Wed Feb 03, 2010 12:55 pm

Re: [OT] Rev and Quartam Reports

Post by gpearson » Tue Jun 08, 2010 2:41 am

After spending almost 2 hours going through my application and looking at a zip file that was provided by another forum user to help me, I figured out why I was not receiving the answer dialog box and getting the system beep through the speakers each time I clicked on the Print Results Button.


The Property Inspector of the SubStack had a check mark on the following line which was the problem for me. This line was Float above everything and did not allow me to see the answer dialog box. Well now that I have solved this, I will try to continue to intergrate the reporting engine into my application.
---
Graham Pearson
Goshen, IN USA

We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com

gpearson
Posts: 84
Joined: Wed Feb 03, 2010 12:55 pm

Re: [OT] Rev and Quartam Reports

Post by gpearson » Wed Jun 09, 2010 2:30 pm

Jan,

Now that I was able to solve my issue with the Float above everything, I am now ready to take it to the next step. On a substack called Display Results I have a card that is named Current Results. This card has 3 objects: 2 are buttons (Close Window, Print Results) and a Data Grid called OrganizationStatus. This data grid goes out to the Internet and parses an XML Packet to display the Organization Name, Organization Type, Reason, and Additional Comments.

I am wanting that when a user clicks the Print Results Button that it run the necessary script to print the information in the data grid through Quartam Reports to the default printer that is configured on the computer. I have been searching the net to find me the resources without any luck. I am hoping to have this completed by the end of this month so that next school year this would be ready to go.

Does anyone have sample script on how to print the information of a datagrid to the report engine?

Janschenkel wrote:Hi Graham,

The first thing to check, is if the revEngine can find qrtReportsLib.rev - the easiest way to make this happen, is by adding it to your mainStack's stackFiles. Open the Stack Inspector, switch to the 'Stack files' panel, and click the 'folder' icon to track down the file qrtReportsLib.rev on your hard drive - once you've found it, click the 'Open' button to add it to the stackFiles property of your mainstack.
As a bonus, the rev standalone builder will automatically include it in the building process.

I'm a bit confused as to why this would lock up rev completely - could you open the Message Watcher and see what happens? Could you also post the script you're using to print? Are you using one of the 'simple' printing commands (qrtReports_PrintReportForStack/qrtReports_PrintReportForCursor/qrtReports_PrintReportForQuery) or have you built a data broker script?

I'm sure we'll get it sorted out.

Jan Schenkel
---
Graham Pearson
Goshen, IN USA

We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: [OT] Rev and Quartam Reports

Post by Janschenkel » Fri Jun 11, 2010 5:56 am

A while back, I posted a sample script on how to print a report for datagrids, using a data broker script:
http://forums.quartam.com/forum/topics/ ... ls-as-data
Data brokers require the Professional Edition of Quartam Reports.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

gpearson
Posts: 84
Joined: Wed Feb 03, 2010 12:55 pm

Re: [OT] Rev and Quartam Reports

Post by gpearson » Mon Jun 14, 2010 2:56 pm

Lets change the topic a bit. I am modifying my code to allow me to use the standard version of Quartam Reports.

In my mouseUp script I have

Code: Select all

  put 1 into sCurrentRow
  PrepareRecordData
  local tLayoutFile, tDataBroker, tShowPreview
  put "TestReport.qrl" into tLayoutFile
  put the long ID of me into tDataBroker
  put true into tShowPreview
  qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
In the same directory that my Runtime Revolution Code is located at I have the report layout called TestReport.qrl. When I run the script, I am getting an error message that says:

An error has occurred while printing the report. Could not find file TestReport.qrl


I also tried to put the TestReport.qrl file into the Main Directory where Quartam Reports was installed and still received the same error message.
---
Graham Pearson
Goshen, IN USA

We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: [OT] Rev and Quartam Reports

Post by Mark » Mon Jun 14, 2010 5:28 pm

Graham,

You need to either set the defaultFolder to the directory containing the file or provide the full path to the file.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: [OT] Rev and Quartam Reports

Post by Janschenkel » Tue Jun 15, 2010 7:06 am

Mark is correct, the revEngine needs some pointer in order to find the file. That's why I usually employ a helper function like the following:

Code: Select all

function MyReportPath pReportName
  local tReportPath
  --
  put the effective filename of this stack into tReportPath
  set the itemDelimiter to slash
  put pReportName into item -1 of tReportPath
  return tReportPath
end MyReportPath
I put this into the mainstack script, and then I call it from the report printing button:

Code: Select all

on mouseUp
  local tLayoutFile, tDataBroker, tShowPreview
  --
  put MyReportPath("TestReport.qrl") into tLayoutFile
  put the long ID of me into tDataBroker
  put true into tShowPreview
  qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
end mouseUp
If you put the .qrl files in the same directoryas the stack, you're all set; but you can extend the MyReportPath function to look for them in a subdirectory or somewhere else entirely if you're running as a standalone application.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

westerw
Posts: 14
Joined: Tue Apr 09, 2013 7:33 pm

Re: [OT] Rev and Quartam Reports

Post by westerw » Tue Jul 30, 2013 2:02 pm

This is three years after the original posting.
I am trying to print a data grid.

1) http://forums.quartam.com/forum/topics/ ... ls-as-data this link is 404 Not Found. Can we get it back?

2) I have been testing Quartam Reports in evaluation mode (30 day trial) with an application and running into problems.
Most of them have been solved (adding Quartam into the MainStack, locating the qrl file, etc).
But I am really stuck on the final problem. My report will not print "anything".
I put a couple of "answer" statements into the code to try to trace what is/is not happening (see code).
Jan Schenkel has been very helpful along the way; and said that "debug" mode will not work.

Code: Select all

local printRows, printCount, dataArray

on mouseUp
   
   put the dgNumberOfLines of group "dgKnightLife" into printRows
   local tLayoutFile, tDataBroker, tShowPreview
   put myReportPath("LABEL--KnightLife.qrl") into tLayoutFile
   put the long ID of me into tDataBroker
   put true into tShowPreview
   -- PRINT the report
   answer "LAYOUT:  " & tLayoutFile
   qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview
     
end mouseUp


-- QUARTAM Reports required Handlers and Functions
function qrtReports_EndOfReport
   -- EOF if past the end of print rows
   return (printCount > 5)  
end qrtReports_EndOfReport

on qrtReports_MoveNextRecord
     
   add 1 to printCount
   answer "ENTER MoveNextRecord    "  & ": :" & printCount  
   
   if (printCount <= 5) Then   
      --FETCH the next row from the Data Grid
      put the dgDataOfIndex[printCount] of the group "dgKnightLife" into tDataRow
      put empty into dataArray
      put tDataRow["ID Number"] into dataArray["ID Number"]
      put tDataRow["First Name"] into dataArray["First Name"]
      put tDataRow["Last Name"] into dataArray["Last Name"]
      put tDataRow["Title"] into dataArray["Title"]
      put tDataRow["Suffix"] into dataArray["Suffix"]
      answer dataArray["ID Number"] & ": :" & dataArray["First Name"] & ": :" & dataArray["Last Name"] &": :" & dataArray["Title"] & ": :" & dataArray["Suffix"]
   end if   

end qrtReports_MoveNextRecord

function qrtReports_ValueOfExpression pExpression
   -- required -- but I do not have any expression to evaluate
   local tExpression
   put pExpression into tExpression
   replace "<QUOTE_REPLACEMENT>" with quote in tExpression
   return value(tExpression) 
   --return true
end qrtReports_ValueOfExpression



What happens:
I get the answer for the file location
Then the "qrtReports_PrintReport tLayoutFile, tDataBroker, tShowPreview" begins execution
In "on qrtReports_MoveNextRecord" I never get the answer "answer "ENTER MoveNextRecord " & ": :" & printCount" statement
There is a flash of message(s) with "building" in it -- not enough time to read it/them.
Then the report shows with no header, no data -- just totally blank


Anybody have ideas?
Any real time experience with Quartam Reports?
I really would like to feel comfortable buying Quartam Reports -- knowing that my data will appear.

Thank you
Bill Wester

blairetabay
Posts: 34
Joined: Mon Feb 24, 2014 10:12 am

Re: [OT] Rev and Quartam Reports

Post by blairetabay » Wed Mar 26, 2014 3:27 pm

after i bought a license on quartam and register still i cannot print any suggestion how to fix this

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”