Reportico Laravel Module

<< Back to embedding reports

Embed SQL Results Output

You can run report output without having to create a report. Just set the reportico project that relates to the database you want to run against (using the initial_project parameter) and use the initial_sql parameter to provide the SQL query. Note you cannot use the SELECT * notation in Reportico, you have to specify report columns.
Notice how column aliases in the SQL are used to set column titles.

    $engine = App::make("getReporticoEngine");
    $engine->initial_execute_mode = "EXECUTE";
    $engine->access_mode = "ONEREPORT";
    $engine->initial_sql = "SELECT CustomerID AS Id, companyname as company, contactname as contact_name FROM northwind_customers";
    $engine->initial_project = "northwind";
    $engine->initial_project_password = "password"; // If project password required
    $engine->set_attribute("ReportTitle","Customer List");
    $engine->clear_reportico_session = true;
    $engine->execute();

Note the use of the set_attribute function to set the report title. You can hide the report title instead using the call :-

$engine->output_template_parameters["show_hide_report_output_title"] = "hide";

Customer List

IdCompanyContact Name
ALFAAAlfreds FutterkisteMaria Anders
ANATRAna Trujillo Emparedados y heladosAna Trujillo
ANTONAntonio Moreno TaqueríaAntonio Moreno
AROUTAround the HornThomas Hardy
BERGSBerglunds snabbköpChristina Berglund
BLAUSBlauer See DelikatessenHanna Moos
BLONPBlondel père et filsFrédérique Citeaux
BOLIDBólido Comidas preparadasMartín Sommer
BONAPBon app'Laurence Lebihan
BOTTMBottom-Dollar MarketsElizabeth Lincoln
BSBEVB's BeveragesVictoria Ashworth
CACTUCactus Comidas para llevarPatricio Simpson
CENTCCentro comercial MoctezumaFrancisco Chang
CHOPSChop-suey ChineseYang Wang
COMMIComércio MineiroPedro Afonso
CONSHConsolidated HoldingsElizabeth Brown
DRACDDrachenblut DelikatessenSven Ottlieb
DUMONDu monde entierJanine Labrune
EASTCEastern ConnectionAnn Devon
ERNSHErnst HandelRoland Mendel
FAMIAFamilia ArquibaldoAria Cruz
FISSAFISSA Fabrica Inter. Salchichas S.A.Diego Roel
FOLIGFolies gourmandesMartine Rancé
FOLKOFolk och fä HBMaria Larsson
FRANKFrankenversandPeter Franken
FRANRFrance restaurationCarine Schmitt
FRANSFranchi S.p.A.Paolo Accorti
FURIBFuria Bacalhau e Frutos do MarLino Rodriguez
GALEDGalería del gastrónomoEduardo Saavedra
GODOSGodos Cocina TípicaJosé Pedro Freyre
GOURLGourmet LanchonetesAndré Fonseca
GREALGreat Lakes Food MarketHoward Snyder
GROSRGROSELLA-RestauranteManuel Pereira
HANARHanari CarnesMario Pontes
HILAAHILARIÓN-AbastosCarlos Hernández
HUNGCHungry Coyote Import StoreYoshi Latimer
HUNGOHungry Owl All-Night GrocersPatricia McKenna
ISLATIsland TradingHelen Bennett
KOENEKöniglich EssenPhilip Cramer
LACORLa corne d'abondanceDaniel Tonini
LAMAILa maison d'AsieAnnette Roulet
LAUGBLaughing Bacchus Wine CellarsYoshi Tannamuri
LAZYKLazy K Kountry StoreJohn Steel
LEHMSLehmanns MarktstandRenate Messner
LETSSLet's Stop N ShopJaime Yorres
LILASLILA-SupermercadoCarlos González
LINODLINO-DelicatesesFelipe Izquierdo
LONEPLonesome Pine RestaurantFran Wilson
MAGAAMagazzini Alimentari RiunitiGiovanni Rovelli
MAISDMaison DeweyCatherine Dewey
MEREPMère PaillardeJean Fresnière
MORGKMorgenstern GesundkostAlexander Feuer
NORTSNorth/SouthSimon Crowther
OCEANOcéano Atlántico Ltda.Yvonne Moncada
OLDWOOld World DelicatessenRene Phillips
OTTIKOttilies KäseladenHenriette Pfalzheim
PARISParis spécialitésMarie Bertrand
PERICPericles Comidas clásicasGuillermo Fernández
PICCOPiccolo und mehrGeorg Pipps
PRINIPrincesa Isabel VinhosIsabel de Castro
QUEDEQue DelíciaBernardo Batista
QUEENQueen CozinhaLúcia Carvalho
QUICKQUICK-StopHorst Kloss
RANCHRancho grandeSergio Gutiérrez
RATTCRattlesnake Canyon GroceryPaula Wilson
REGGCReggiani CaseificiMaurizio Moroni
RICARRicardo AdocicadosJanete Limeira
RICSURichter SupermarktMichael Holz
ROMEYRomero y tomilloAlejandra Camino
SANTGSanté GourmetJonas Bergulfsen
SAVEASave-a-lot MarketsJose Pavarotti
SEVESSeven Seas ImportsHari Kumar
SIMOBSimons bistroJytte Petersen
SPECDSpécialités du mondeDominique Perrier
SPLIRSplit Rail Beer & AleArt Braunschweiger
SUPRDSuprêmes délicesPascale Cartrain
THEBIThe Big CheeseLiz Nixon
THECRThe Cracker BoxLiu Wong
TOMSPToms SpezialitätenKarin Josephs
TORTUTortuga RestauranteMiguel Angel Paolino
TRADHTradição HipermercadosAnabela Domingues
TRAIHTrail's Head Gourmet ProvisionersHelvetius Nagy
VAFFEVaffeljernetPalle Ibsen
VICTEVictuailles en stockMary Saveley
VINETVins et alcools ChevalierPaul Henriot
WANDKDie Wandernde KuhRita Müller
WARTHWartian HerkkuPirkko Koskitalo
WELLIWellington ImportadoraPaula Parente
WHITCWhite Clover MarketsKarl Jablonski
WILMKWilman KalaMatti Karttunen
WOLZAWolski ZajazdZbyszek Piestrzeniewicz
Page Footer